<?php

namespace app\common\command;

use app\common\logic\CommonLogic;
use app\common\logic\DriverLogic;
use think\console\Command;
use think\console\Input;
use think\console\Output;

/**
 * @package app\admin\model
 *  命令行
 */
class EvenDay extends Command
{
    //再命令窗口中执行“php think evenDay”  每1天（每天0点0分执行一次）
    protected function configure()
    {
        $this->setName('evenDay')
            ->setDescription('脚本');
    }

    protected function execute(Input $input, Output $output)
    {
        // 线路分佣
        $driverLogic = new DriverLogic();
        $driverLogic->getHandleOrderCommission();
        CommonLogic::savePCA(); // 自动获取新省市区保存到本地

        $output->writeln("成功");
    }
}